﻿<UserControl x:Class="Tanmia.Warehouse.Presentation.Scenarios.SectionBrowser"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:basis="clr-namespace:Tanmia.Basis.WPF.Controls;assembly=Tanmia.Basis"
>
    <StackPanel Orientation="Vertical">
        <ToolBar>
            <Button Content="تحديث" Command="{Binding Path=RefreshCommand}" />
            <Button Content="حذف" Command="{Binding Path=DeleteCommand}" />
            <Button Content="إغلاق" Command="{Binding Path=CloseCommand}" />
            <Button Content="تعديل" Command="{Binding Path=ShowEditorCommand}" />
        </ToolBar>
        <DataGrid ItemsSource="{basis:GridBinding Path=Entities}" IsSynchronizedWithCurrentItem="True">
            <DataGrid.ItemContainerStyle>
                <Style TargetType="{x:Type DataGridRow}">
                    <Setter Property="IsSelected" Value="{Binding Mode=TwoWay, Path=IsSelected}" />
                </Style>
            </DataGrid.ItemContainerStyle>
        </DataGrid>
    </StackPanel>
</UserControl>
